amino_acids = "ACDEFGHIKLMNPQRSTVWY"  

file_path = "program-test/work1.md"  
with open(file_path, "r", encoding="utf-8") as f:
    md_content = f.readlines()  

seq_lines = []
capture_seq = False  
for line in md_content:
    line = line.strip()  
    if line.startswith(">"):
        capture_seq = True  
        continue  
    if capture_seq and line:  
        seq_lines.append(line)

seq = "".join(seq_lines)

counts = {aa: 0 for aa in amino_acids}
total = len(seq)
for aa in seq:
    if aa in counts:
        counts[aa] += 1

for aa, cnt in counts.items():
    percentage = (cnt / total) * 100
    print(f"{aa}: {percentage:.2f}%")
